home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / kcl / akcl / akcl1615.lha / doc / funcall-comp < prev    next >
Lisp/Scheme  |  1988-10-12  |  956b  |  36 lines

  1.  
  2. In AKCL version 1.78 I observe the following times
  3.  
  4. (defun joe () nil)
  5. (setq  cfun #'joe)
  6. (setq symbol 'joe)
  7. after compilation (on a sun3/280)
  8.                         
  9. Form                       AKCL 1.78   KCL    
  10. (joe)                 6.1       7.7    
  11. (funcall cfun)        9.5      14.0    
  12. (funcall symbol)     13.7      17.8   
  13. (joe1)                     2.1       2.5    
  14.  
  15. times are in microseconds per call.
  16. joe1 is the same as joe but with (proclaim '(function joe1 () t))
  17. The functions were in the same file, although this would not make
  18. a difference for AKCL.
  19.  
  20. A typical timing loop is
  21. (defun foo1 (x n)  (sloop for i below n do (funcall x)))
  22. (defun foo2 ( n) (sloop for i below n do (joe)))
  23. (defun foo3 ( n) (sloop for i below n do (joe1)))
  24.  
  25. (time (foo1 #'joe 100000))
  26. (time (foo1 'joe 100000))
  27. (time (foo2 100000))
  28.  
  29. Note: An AKCL version >= 1.78  will be released in a few days
  30. when I finish checking over the 8 and 16 bit arrays which have been
  31. added.
  32.  
  33.  
  34.  
  35.  
  36.